/**
 * 
 */
package com.zhiteng.service;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.web.multipart.MultipartFile;

import com.zhiteng.entity.AdjustBill;
import com.zhiteng.entity.CourseNode;
import com.zhiteng.entity.CourseTable;
import com.zhiteng.entity.Teacher;
import com.zhiteng.vo.CourseTableVo;
import com.zhiteng.vo.TeacherVo;

/**  
* <p>Title: CourseTableService.java</p>  
* <p>Description: </p>  
* @author dragon  
* @date 2018年11月8日  
* @version 1.0  
*/
public interface CourseTableService {
	
	Map<String,Object> saveCourseTableAll(MultipartFile file, String schoolId, String year, String term);

	List<String> queryCourseNameBySchool(String schoolName);

	List<String> queryTeacherNameBySchoolAndCourse(String schoolName, String courseName);

	List<String> queryGradeBySchool(String schoolId);

	List<String> queryClassBySchoolAndGrade(String schoolId, String gradeName);
	
	//	根据学校名称和教师名称计算该教师一周中的每一天各有几节课
	Map<Integer,Integer> queryCountNodeEveryDay(String schoolId,String teacherId);
	
	CourseTable queryCourseTable(CourseTableVo courseTableVo) throws Exception;
	
	int queryFirstCount(String teacher_id, String week, int nodeIndex);
	
	void saveUnmatchedTeacher(TeacherVo teacherVo);
	
	Teacher queryTeacherByTeacherVo(TeacherVo teacherVo);
	
	int queryTotalCourseTable(String schoolId, String year, String term);	
	/////////////////////////////////////////////////////////////////////

	// 根据学校名称和教师名称计算该教师一周中的每一天各有几节课
	Map<Integer, Integer> countNodeEveryDay(String schoolName, String teacherName);

	List<CourseTable> queryTeacherBySchoolId(String schoolId, int type);

	List<CourseNode> queryKCBySchoolId(String schoolId);

	List<CourseNode> queryKCByTeacherNameAndSchoolId(String schoolId, String teacherName);

	List<CourseNode> queryTimeByTeacherNameAndKC(String schoolId, String teacherName, String kC);

	List<Integer> queryCourseNumByTeacherNameAndKCAndWeek(String schoolId, String teacherName, String kC, String week);

	CourseTable queryTeacherNameByTeacherId(String schoolId, String teacherId);

	List<CourseNode> queryClassNameByTeacherNameAndKCAndRequestDay(String schoolId, String teacherId, String week);

	List<CourseNode> queryKCByTeacherIdAndSchoolID(String teacherId, String schoolId);

	List<CourseNode> queryCourseNumByTeacherNameAndKCAndRequestDayAndClassName(String teacherId, String schoolId,
			String requestDay, String className);

	List<CourseNode> queryKCByTeacherIdAndSchoolIDAndRequestDayAndClassNameAndCourseNum(String teacherId,
			String schoolId, String week, String className, int courseNum);


	List<CourseNode> queryTeacherBySchoolIdAndRequestDayAndCourseNum(String schoolId, String requestDay, int courseNum);

	HashSet<CourseNode> queryTeacherBySchoolIdAndClassName(String schoolId, String className);

	CourseNode queryTeacherBySchoolIdAndRequestDayAndCourseNumAndClassNameAndGradeName(String schoolId,
			String requestDay, int courseNum, String className, String gradeName);

	HashSet<CourseNode> queryTeacherBySchoolIdAndGradeName(String schoolId, String gradeName);

	List<CourseTable> queryCourseTableBySchoolId(String school_id);

	CourseNode queryGradeNameBySchoolIdAndTeacherIdAndOldClassAndOldSubjectAndOld_nodeAndWeek(AdjustBill adjustBill);

	List<CourseTable> queryCourseTableByClassNameAndSchoolNameAndGradeName(String className, String schoolId,
			String gradeName);

	CourseNode queryCourseNodeByCourseNodeId(String courseNodeId);

	List<CourseTable> queryCourseTableBySchoolIdAndTeacherId(String schoolId, String teacherId);

	List<CourseNode> queryClassNameByTeacherNameAndKCAndRequestDayAndCourseNum(String school_id, String petitioner_id,
			String week, Integer course_num);

	List<CourseTable> queryCourseTableBySchoolIdAndTeacherId2(String schoolId, String teacherId, String string);
	
	List<CourseNode> queryCourseNodeByTeacherId(String school_id, String petitioner_id);
	
	int queryCountBetween(String teacher_id, String week, int startNode, int endNode);
	
	List<String> queryUnmatchedTeacherNamesBySchoolId(String schoolId);
	
}
